import scala.collection.mutable.ListBuffer

object t04 {
  def main(args: Array[String]): Unit = {
    val nums = 1 :: 2 :: 3 :: 4 :: Nil
    println(nums.take(3))

    var list2=ListBuffer("aaa","bbb","ccc","ddd","abc")
    println(list2.filter(p=>p.startsWith("a")))

    val set1=Set(1,2,3,4,5,6,7,8,9,10)
    val  iter=set1.iterator
    while (iter.hasNext){
      println(iter.next())
    }


  }
}
